<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    
</head>
<body>

</body>
<script type="text/javascript">
    function sum() {
        //alert(arguments.length);
        var result = 0;
        for(var i=0;i<arguments.length;i++){
            result+=arguments[i];
        }
        return result;
    }

    alert(sum(3,4,7));
</script>
</html>